Skip to content

GH-132983: Remove subclassing support from zstd types#133694

Merged
AA-Turner merged 1 commit intopython:mainfrom
AA-Turner:zstd-no-subclass
May 8, 2025
Merged

GH-132983: Remove subclassing support from zstd types#133694
AA-Turner merged 1 commit intopython:mainfrom
AA-Turner:zstd-no-subclass

Conversation

@AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented May 8, 2025

cc @Rogdham

For what it's worth, bz2 and lzma's decompressor subclassing fail on creation:

>>> import bz2
>>> class D(bz2.BZ2Decompressor): pass
... 
Traceback (most recent call last):
  File "<python-input-18>", line 1, in <module>
    class D(bz2.BZ2Decompressor): pass
TypeError: type '_bz2.BZ2Decompressor' is not an acceptable base type

>>> import lzma
>>> class D(lzma.LZMADecompressor): pass
... 
Traceback (most recent call last):
  File "<python-input-19>", line 1, in <module>
    class D(lzma.LZMADecompressor): pass
TypeError: type '_lzma.LZMADecompressor' is not an acceptable base type

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants